<?php

use Illuminate\Database\Schema\Blueprint;

class CreateRolePermissions extends \App\Utils\CreateMigration
{

    function columns(Blueprint $table)
    {
        $table->string('role_tag', 50)->default('')->comment('角色ID');
        $table->unsignedBigInteger('permission_id')->default(0)->comment('权限ID');
        $table->unique(['deleted_at', 'permission_id', 'role_tag'], 'uniq_deleted_role_tag_permission');
    }

    function tableInfo()
    {
        return ['role_permissions','角色权限'];
    }
}
